<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2</title>
</head>
<body>
<script>
    //输出1-1000之间能被5整除的数，并且每行输出3个
    var count = 0;
    var str = "";
    for (let i = 1; i <= 1000; i++) {
        if (i % 5 == 0) {
            str += i + " ";
            count++;
            if (count % 3 == 0) {
                str += "\n";
            }
        }
    }
    console.log(str);
</script>
</body>
</html>